<admintpl file="header" />
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li><a href="{:U('Sysbanner/index')}">轮播图列表</a></li>
		<li><a href="{:U('Sysbanner/add')}">添加轮播图</a></li>
		<li class="active"><a href="javascript:;">编辑轮播图</a></li>
	</ul>
	<form method="post" class="form-horizontal js-ajax-form" enctype="multipart/form-data" action="{:U('Sysbanner/edit_post')}">
		<fieldset>
			<div class="control-group">
				<label class="control-label"><b style="color:red;">* </b> 分类名称</label>
				<div class="controls">
					<select name="kind_id" id="kind_id" onchange="kindname()">
						<option value="">请选择</option>
						<foreach name="kind" item="vo">
							<option value="{$vo.kind_id}" <if condition="$sys['kind_id'] eq $vo['kind_id']">selected</if> >{$vo.kind_name}</option>
						</foreach>
						<input type="hidden" id="kind_name" name="kind_name" value="{$sys.kind_name}">
					</select>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><b style="color:red;">* </b> 轮播图</label>
				<div class="controls">
					<input type="file" name="banner_img_url">
					<input type="hidden" name="image_url" value="{$sys.banner_img_url}">
					<img src="<php>echo '/'.C('UPLOADPATH').$sys['banner_img_url']</php>" width="100px">
					&nbsp; <b style="color:red">*</b>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"> 跳转链接</label>
				<div class="controls">
					<input type="text" name="banner_link" value="{$sys.banner_link}">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"> 备注说明</label>
				<div class="controls">
					<textarea name="remark" rows="2" cols="20" id="content" class="inputtext" style="height: 100px; width: 500px;">{$sys.remark}</textarea>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">{:L('STATUS')}</label>
				<div class="controls">
					<if condition="$sys.use_flg eq 1">
						<label class="radio inline" for="active_true"><input type="radio" name="use_flg" value="1" checked  />{:L('ENABLED')}</label>
						<label class="radio inline" for="active_false"><input type="radio" name="use_flg" value="0"  >{:L('DISABLED')}</label>
					<else />
						<label class="radio inline" for="active_true"><input type="radio" name="use_flg" value="1" />{:L('ENABLED')}</label>
						<label class="radio inline" for="active_false"><input type="radio" name="use_flg" value="0" checked >{:L('DISABLED')}</label>
					</if>
				</div>
			</div>
		</fieldset>
		<div class="form-actions">
			<input type="hidden" name="id" value="{$sys.id}">
			<button type="submit" class="btn btn-primary js-ajax-submit" >{:L('EDIT')}</button>
			<a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
		</div>
	</form>
</div>
<script>
    function kindname(){
        var name = $("#kind_id").find("option:selected").text();
        $("#kind_name").val(name);
    }
</script>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>